<include file="Public/head"/>
<link href="__PUBLIC__/qwadmin/css/shen/shen.css" rel="stylesheet" type="text/css" />
<body class="no-skin">
<include file="Public/header"/>
<div class="main-container" id="main-container">
<style>
#xuanxiang button{
    margin:40px 45px;
    width:100px;
    height:50px;
}
</style>
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }

    </script>

    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>
                <div style="width:100%;">
                    <div  style="width:300px;height:500px;border:1px solid #ccc;box-shadow:1px 1px 15px #ccc;margin: 50px 50px; float:left;" class="che">
                        <div class="dao" style="background-color:#E88103;">选择车辆信息</div>  <!-- 导航头 -->
                        <ul>
                            
                            <li onclick="bx()"><button class="btn-info" >车辆保险</button></li><br>
                            <li onclick="yk()"><button class="btn-info" >油卡信息</button></li>
                        </ul>
                    


                    <div class="xiao" id="bdao" style="width:100px;height:100px;border:1px solid #ccc;box-shadow:1px 1px 15px #ccc;margin-left:100%;margin-top:-90%;display:none;">
                        <ul>
                            <li onclick="blie()"><button class="btn-info" >保险列表</button></li>
                            <li onclick="btian()"><button class="btn-info" >保险填入</button></li>
                            <!-- <li><button class="btn-info" >油卡录入</button></li> -->
                        </ul>
                     </div>
                    

                    <div class="xiao" id="ydao" style="width:100px;height:150px;border:1px solid #ccc;box-shadow:1px 1px 15px #ccc;margin-left:100%;margin-top:-49%;display:none;">
                        <ul>
                            <li onclick="ylu()"><button class="btn-info" >油卡录入</button></li>
                            <li onclick="ychong()"><button class="btn-info" >油卡充值</button></li>
                            <li onclick="jiay()"><button class="btn-info" >加油申请</button></li>
                            <!-- <li><button class="btn-info" >油卡录入</button></li> -->
                        </ul>
                     </div>


                   </div>


                    <!--保险列表-->
                    <div class="bblie" id="bbiao" style="width:40%;height:600px;border:1px solid #fff;box-shadow:1px 1px 15px #ccc;float:left;margin-left:200px;margin-top:50px; display:none;">
                    <div class="dao" style="background-color:#5BC0DE;box-shadow:1px 1px 20px #5BC0DE;">保险列表</div>  <!-- 导航头 -->
                        <table class="table table-bordered">
                            <thead>
                                <tr>
                                    <!-- <th class="center"><input class="check-all" type="checkbox" value=""></th> -->
                                    <th class="center">编号</th>
                                    <th class="center">凭证图片</th>                           
                                    <th class="center">保险车辆</th>
                                    <th class="center">车牌号</th>
                                    <th class="center">保险金额</th>
                                    <th class="center">上传时间</th>
                                </tr>
                            </thead>
                            <tbody>
                            <volist name="list" id="v">
                                <tr>
                                    <td class="center">{$v.id}</td>
                                    <td class="center" >
                                        <img src="__PUBLIC__{$v.img}" style="width:60px;height:60px;" >
                                    </td>
                                    <td class="center">{$v.cname}</td>
                                    <td class="center">{$v.number}</td>
                                    <td class="center">{$v.sum}/元</td>
                                    <td class="center">{$v.time}</td>
                                </tr>
                            </volist>
                            </tbody>
                        </table>



                    </div>

                </div>  
                <!--保险列表 ENG-->


                <!--油卡列表-->
                <div class="bblie" id="ybiao" style="width:40%;height:600px;border:1px solid #fff;box-shadow:1px 1px 15px #ccc;float:left;margin-left:200px;margin-top:50px; display:none;">
                    <div class="dao" style="background-color:#5BC0DE;box-shadow:1px 1px 20px #5BC0DE;">油卡列表</div>  <!-- 导航头 -->
                        <table class="table table-bordered">
                            <thead>
                                <tr>
                                    <!-- <th class="center"><input class="check-all" type="checkbox" value=""></th> -->
                                    <th class="center">编号</th>
                                    <th class="center">油卡卡号</th>                           
                                    <th class="center">现有金额</th>                           
                                    <th class="center">录入时间</th>
                                    <!-- <th class="center">操作</th> -->
                                   <!--  <th class="center">车牌号</th>
                                    <th class="center">保险金额</th>
                                    <th class="center">上传时间</th> -->
                                </tr>
                            </thead>
                            <tbody>
                            <volist name="ylist" id="vo">
                                <tr>
                                    <td class="center">{$vo.id}</td>
                                    
                                    <td class="center">{$vo.cnum}</td>
                                    <!-- <td class="center">{$v.number}</td> -->
                                    <td class="center">{$vo.sum}/元</td>
                                    <td class="center">{$vo.time}</td>
                                    

                                </tr>
                            </volist>
                            </tbody>
                        </table>



                    </div>

                </div>  
                <!--油卡列表 ENG-->
                <div id="xuanxiang" style="display:none;">
                    <button class="btn-info" onclick="nei()">市内派车</button>
                    <!-- <button class="btn-warning" onclick="lao()">劳保用品</button> -->
                    <button class="btn-success" onclick="wai()">市外派车</button>
    
                </div>


            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <include file="Public/footer"/>

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<!-- inline scripts related to this page -->
<script src="__PUBLIC__/layer/layer.js"></script>
<script src="__PUBLIC__/jquery-1.7.2.min.js"></script>
<script src="__PUBLIC__/js/laydate/laydate.js"></script>

<script>

// 保险导航
function bx()
{
    $('#bdao').fadeToggle(800);
    $('#ydao').hide();
}

// 保险列表
function blie()
{
    $('#bbiao').fadeToggle(800);
    $('#ybiao').hide();
}


// // ------------------------------------------保险填入 

function btian()
{
   layer.open({
        type: 1,
        title:  ['保险填入', 'font-size:17px;'],
        skin: 'demo-class', //加上边框
        area: ['350px', '350px'], //宽高
        content: $('#bt'),
        // btn:'按钮'
        });
}




// // ------------------------------------------保险填入 END


// 油卡导航
function yk()
{
    $('#ydao').fadeToggle(800);
    $('#bdao').hide();
    $('#ybiao').fadeToggle(800);
    $('#bbiao').hide();
}
//油卡录入
function ylu()
{
   layer.open({
        type: 1,
        title:  ['油卡录入', 'font-size:17px;'],
        skin: 'demo-class', //加上边框
        area: ['300px', '250px'], //宽高
        content: $('#yk'),
        // btn:'按钮'
        });
}

//油卡信息导入
function ykshen()
{
    // console.log('1111');
     $.ajax({
         type: "POST",
         url:"{:U('Che/ykadd')}",
         data:$('#ykformID').serialize(),// 要提交的表单 
         beforeSend:function(){
                 layer.load(0, {shade: false});
             },
         success: function(msg) {
           if (msg == 1111) {
                layer.confirm('确定录入么？', {
                btn: ['确定'] //按钮
            }, function(){
                layer.msg('录入成功!!', {icon: 1});
            }, function(){
                layer.msg('已取消', {
                time: 20000, //20s后自动关闭
                // btn: ['明白了', '知道了']
            });
            });
            }else{
                layer.msg('申请失败,请重新再试!');
            }
         },
         complete: function() {
                     layer.closeAll('loading');
                }
     });
}





//油卡充值

function ychong()
{
   layer.open({
        type: 1,
        title:  ['油卡充值', 'font-size:17px;'],
        skin: 'demo-class', //加上边框
        area: ['300px', '250px'], //宽高
        content: $('#yc'),
        // btn:'按钮'
        });
}




//油卡充值信息导入
function ycshen()
{
    // console.log('1111');
     $.ajax({
         type: "POST",
         url:"{:U('Che/ykadd')}",
         data:$('#ycformID').serialize(),// 要提交的表单 
         success: function(msg) {
           if (msg == 1111) {
                layer.confirm('确定申请么？', {
                btn: ['确定'] //按钮
            }, function(){
                layer.msg('已提交,请等待审批!', {icon: 1});
            }, function(){
                layer.msg('已取消', {
                time: 20000, //20s后自动关闭
                // btn: ['明白了', '知道了']
            });
            });
            }else{
                layer.msg('申请失败,请重新再试!');
            }
         }
     });
}



//油卡加油申请

function jiay()
{
   layer.open({
        type: 1,
        title:  ['油卡充值', 'font-size:17px;'],
        skin: 'demo-class', //加上边框
        area: ['300px', '300px'], //宽高
        content: $('#jy'),
        // btn:'按钮'
        });
}


//加油申请信息导入
function ycshen()
{
    // console.log('1111');
     $.ajax({
         type: "POST",
         url:"{:U('Che/ykadd')}",
         data:$('#jyformID').serialize(),// 要提交的表单 
         success: function(msg) {
           if (msg == 1111) {
                layer.confirm('确定申请么？', {
                btn: ['确定'] //按钮
            }, function(){
                layer.msg('已提交,请等待审批!', {icon: 1});
            }, function(){
                layer.msg('已取消', {
                time: 20000, //20s后自动关闭
                // btn: ['明白了', '知道了']
            });
            });
            }else{
                layer.msg('申请失败,请重新再试!');
            }
         }
     });
}







// // ------------------------------------------申请派车 
function sche()
{
    layer.open({
    type: 1,
    title:  ['申请派车', 'font-size:20px;'],
    skin: 'demo-class', //加上边框
    area: ['400px', '160px'], //宽高
    // content: $('#sc'),
    content: $('#xuanxiang'),
    // btn:'按钮'
    });
}

function nei()
{
    layer.open({
    type: 1,
    title:  ['申请市内派车', 'font-size:20px;'],
    skin: 'demo-class', //加上边框
    area: ['600px', '600px'], //宽高
    // content: $('#sc'),
    content: $('#sc'),
    // btn:'按钮'
    });
}

function wai()
{
    layer.open({
    type: 1,
    title:  ['申请市外派车', 'font-size:20px;'],
    skin: 'demo-class', //加上边框
    area: ['600px', '600px'], //宽高
    // content: $('#sc'),
    content: $('#sw'),
    // btn:'按钮'
    });
}

function scshen()
{
     $.ajax({
         type: "POST",
         url:"{:U('Che/cheadd')}",
         data:$('#scformID').serialize(),// 要提交的表单 
         success: function(msg) {
           if (msg == 1111) {
                layer.confirm('确定申请么？', {
                btn: ['确定'] //按钮
            }, function(){
                layer.msg('已提交,请等待审批!', {icon: 1});
            }, function(){
                layer.msg('已取消', {
                time: 20000, //20s后自动关闭
                // btn: ['明白了', '知道了']
            });
            });
            }else{
                layer.msg('申请失败,请重新再试!');
            }
         }
     });
}
function swshen()
{
     $.ajax({
         type: "POST",
         url:"{:U('Che/cheadd')}",
         data:$('#swformID').serialize(),// 要提交的表单 
         success: function(msg) {
           if (msg == 1111) {
                layer.confirm('确定申请么？', {
                btn: ['确定'] //按钮
            }, function(){
                layer.msg('已提交,请等待审批!', {icon: 1});
            }, function(){
                layer.msg('已取消', {
                time: 20000, //20s后自动关闭
                // btn: ['明白了', '知道了']
            });
            });
            }else{
                layer.msg('申请失败,请重新再试!');
            }
         }
     });
}

// // ------------------------------------------申请派车 END











</script>



<!-- ---------------------------申请市内派车------------------------------ -->
<div id="sc" style="display:none;">
    <form action="" id='scformID'>
        <input type="hidden" name="type" value="1">
        <!-- <div class="row"> -->
       
        <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">出发地点:</b></label>
            <input type="text" class="form-control" name="c_place" id="exampleInputEmail1" placeholder="请输入地点...." style="width:90%;">
        </div><br>
        <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">到达地点:</b></label><br><br>
            <input type="text" class="form-control"  name="d_place" id="exampleInputEmail1" placeholder="请输入地点...." style="width:90%;">            
        </div><br>
        <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">用车时间:</b></label><br><br>
            <input onClick="laydate()" name="k_time" style="margin-left:-20px;">&nbsp&nbsp &nbsp &nbsp &nbsp <b>至</b> &nbsp<input onClick="laydate()" name="e_time">
        </div><br>
        <input type="hidden" name="type" value="1">
       <!--  <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">共计天数:</b></label>
            <input type="text" class="form-control" name="day" id="exampleInputEmail1" placeholder="请输入天数...." style="width:90%;">
        </div><br> -->
         <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">用车缘由:</b></label>
            <textarea class="form-control" rows="3" name="content" style="width:90%;margin-left:30px;" placeholder="请输入缘由...."></textarea>
        </div>
                           
                            

        <div onclick="scshen()" style="width:100px;height:30px;background-color:#FFA500;border:1px solid #ccc;border-radius:50px;text-align:center;line-height:30px;color:#fff;float:left; bottom: 0;margin-left:42%;margin-top:5%;cursor:pointer;"><b>申请</b></div>
        <!-- </div>　 -->
    </form>
</div>
<!-- ---------------------------申请市内派车   END------------------------------ -->

<!-- ---------------------------申请市外派车------------------------------ -->
<div id="sw" style="display:none;">
    <form action="" id='swformID'>
        <input type="hidden" name="type" value="1">
        <!-- <div class="row"> -->
       
        <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">出发地点:</b></label>
            <input type="text" class="form-control" name="c_place" id="exampleInputEmail1" placeholder="请输入地点...." style="width:90%;">
        </div><br>
        <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">到达地点:</b></label><br><br>
            <input type="text" class="form-control"  name="d_place" id="exampleInputEmail1" placeholder="请输入地点...." style="width:90%;">            
        </div><br>
        <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">用车时间:</b></label><br><br>
            <input onClick="laydate()" name="k_time" style="margin-left:-20px;">&nbsp&nbsp &nbsp &nbsp &nbsp <b>至</b> &nbsp<input onClick="laydate()" name="e_time">
        </div><br>
        <input type="hidden" name="type" value="2">
       <!--  <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">共计天数:</b></label>
            <input type="text" class="form-control" name="day" id="exampleInputEmail1" placeholder="请输入天数...." style="width:90%;">
        </div><br> -->
         <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">用车缘由:</b></label>
            <textarea class="form-control" rows="3" name="content" style="width:90%;margin-left:30px;" placeholder="请输入缘由...."></textarea>
        </div>
                           
                            

        <div onclick="swshen()" style="width:100px;height:30px;background-color:#FFA500;border:1px solid #ccc;border-radius:50px;text-align:center;line-height:30px;color:#fff;float:left; bottom: 0;margin-left:42%;margin-top:5%;cursor:pointer;"><b>申请</b></div>
        <!-- </div>　 -->
    </form>
</div>
<!-- ---------------------------申请市外派车   END------------------------------ -->






<!-- ---------------------------保险填入------------------------------ -->

    <div id="bt" style="display:none;">
                        <form action="{:U('Che/chep')}" enctype="multipart/form-data" method="post">
                            <label for="exampleInputEmail1" style="font-size:15px;margin-left:140px;">车辆名称:</label>
                            <input type="text" name="cname" class="form-control" id="exampleInputEmail1" placeholder="请输入车辆名称...." style="width:183px;margin:1px 80px;">
                                
                            <!-- <input type="hidden" name="type" value="1"> -->
                            <label for="exampleInputEmail1" style="font-size:15px;margin-left:140px;">车牌号:</label>
                            <input type="text" name="number" class="form-control" id="exampleInputEmail1" placeholder="请输入车牌号...." style="width:183px;margin:1px 80px;">

                            <label for="exampleInputEmail1" style="font-size:15px;margin-left:140px;">保险金额:</label>
                            <input type="text" name="sum" class="form-control" id="exampleInputEmail1" placeholder="请输入金额...." style="width:183px;margin:1px 80px;">
                            
                            <label for="exampleInputEmail1" style="font-size:15px;margin-left:140px;">上传凭证:</label>
                            <input type="file" name="photo" class="form-control" id="exampleInputEmail1"  style="width:183px;margin:1px 80px;">
                            <button  style="width:80px;height:25px;background-color:#F0AD4E;border:1px solid #ccc;cursor:pointer;line-height:20px;color:#fff;font-size:15px;border-radius:15px;margin-left:35%;margin-top:5%;text-align:center;">提交</button>
                        </form>
                        
    </div>

<!-- ---------------------------保险填入   END------------------------------ -->






<!-- ---------------------------油卡录入------------------------------ -->

    <div id="yk" style="display:none;">
                        <form id="ykformID">
                            <label for="exampleInputEmail1" style="font-size:15px;margin-left:110px;margin-top:10px;">油卡卡号:</label>
                            <input type="text" name="cnum" class="form-control" id="exampleInputEmail1" placeholder="请输入卡号...." style="width:183px;margin:1px 60px;">
                                
                            <input type="hidden" name="type" value="1">
                            <label for="exampleInputEmail1" style="font-size:15px;margin-left:120px;">金额:</label>
                            <input type="text" name="sum" class="form-control" id="exampleInputEmail1" placeholder="请输入车牌号...." style="width:183px;margin:1px 60px;">
                            
                            
                            <div onclick="ykshen()" style="width:80px;height:25px;background-color:#F0AD4E;border:1px solid #ccc;cursor:pointer;line-height:20px;color:#fff;font-size:15px;border-radius:15px;margin-left:35%;margin-top:5%;text-align:center;">提交</div>
                        </form>
                        
    </div>

<!-- ---------------------------油卡录入   END------------------------------ -->





<!-- ---------------------------油卡充值------------------------------ -->

    <div id="yc" style="display:none;">
                        <form id="ycformID">
                            <label for="exampleInputEmail1" style="font-size:15px;margin-left:110px;margin-top:10px;">油卡卡号:</label>
                            <select name="cnum" style="width:180px;margin:1px 60px;">

                                    <volist name="ylist" id="voo">
                                        <option value="请选择">请选择油卡..</option>
                                        <option value="{$voo.cnum}">{$voo.cnum}</option>
                                    </volist>

                                    
                            </select>
                                
                            <input type="hidden" name="type" value="2">
                            <label for="exampleInputEmail1" style="font-size:15px;margin-left:120px;">充值金额:</label>
                            <input type="text" name="sum" class="form-control" id="exampleInputEmail1" placeholder="请输入金额...." style="width:183px;margin:1px 60px;">
                            
                            
                            <div onclick="ycshen()" style="width:80px;height:25px;background-color:#F0AD4E;border:1px solid #ccc;cursor:pointer;line-height:20px;color:#fff;font-size:15px;border-radius:15px;margin-left:35%;margin-top:5%;text-align:center;">提交</div>
                        </form>
                        
    </div>

<!-- ---------------------------油卡充值   END------------------------------ -->





<!-- ---------------------------加油申请------------------------------ -->

    <div id="jy" style="display:none;">
                        <form id="jyformID">
                            <label for="exampleInputEmail1" style="font-size:15px;margin-left:110px;margin-top:10px;">油卡卡号:</label>
                            <select name="cnum" style="width:180px;margin:1px 60px;">

                                    <volist name="ylist" id="voo">
                                        <option value="请选择">请选择油卡..</option>
                                        <option value="{$voo.cnum}">{$voo.cnum}</option>
                                    </volist>

                                    
                            </select>

                            <label for="exampleInputEmail1" style="font-size:15px;margin-left:110px;margin-top:10px;">汽油标号:</label>
                            <select name="you" style="width:180px;margin:1px 60px;">

                                    
                                        <option value="未选择">请选择标号..</option>
                                        <option value="90">90号</option>
                                        <option value="93">93号</option>
                                        <option value="95">95号</option>
                                        <option value="97">97号</option>

                                    
                            </select>
                                
                            <input type="hidden" name="type" value="3">
                            <label for="exampleInputEmail1" style="font-size:15px;margin-left:120px;">加油金额:</label>
                            <input type="text" name="sum" class="form-control" id="exampleInputEmail1" placeholder="请输入金额...." style="width:183px;margin:1px 60px;">
                            
                            
                            <div onclick="jyshen()" style="width:80px;height:25px;background-color:#F0AD4E;border:1px solid #ccc;cursor:pointer;line-height:20px;color:#fff;font-size:15px;border-radius:15px;margin-left:35%;margin-top:5%;text-align:center;">提交</div>
                        </form>
                        
    </div>

<!-- ---------------------------加油申请   END------------------------------ -->







</body>
</html>
